package day0108;

public class Test8 {
    public static void main(String[] args) {
        printFlowerNums(200,999);
    }

    static  void  printFlowerNums(int start, int end){
        //2.判断它是否是水仙花数( b*b*b + 十位立方 + 个位立方     ==    三位数)
        //2.1.获取百位、十位、个位的值
        for (int num = start; num <= end; num++) {
            int b = num / 1 % 10;
            int sh = num / 10 % 10;
            int g = num / 100 % 10;
            if( b*b*b + sh*sh*sh + g*g*g == num){
                System.out.println(num+ "是水仙花数");
            }
        }
    }
}
